package com.vito.oa.act.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.vito.oa.act.model.ActUserNodeSettingModel;
import com.vito.oa.act.model.ActUserProcessSettingModel;

/**
 * 用户对流程的配置
 * 
 * @author xuezhennan
 * @date 2018年8月28日
 */
public interface ActUserProcessSettingMapper {
	/**
	 * 保存流程配置
	 * 
	 * @param processSetting
	 * @return int
	 */
	public int saveProcessSetting(ActUserProcessSettingModel processSetting);

	/**
	 * 修改设置
	 * 
	 * @param setting
	 */
	public int updateUserProcessSetting(ActUserProcessSettingModel setting);

	/**
	 * 删除流程配置
	 * 
	 * @param processKey
	 * @param companyId
	 * @return
	 */
	public int deleteUserProcessSetting(@Param("processKey") String processKey, @Param("companyId") String companyId);

	/**
	 * 查询企业流程的设置
	 * 
	 * @param processKey
	 * @param companyId
	 * @return ActUserProcessSettingModel
	 */
	public ActUserProcessSettingModel queryUserProcessSetting(@Param("processKey") String processKey,
			@Param("companyId") String companyId);

	/**
	 * 保存用户节点配置
	 * 
	 * @param nodeSetting
	 * @return
	 */
	public int saveNodeSetting(ActUserNodeSettingModel nodeSetting);

	/**
	 * 批量保存节点配置
	 * 
	 * @param nodeSetting
	 * @return int
	 */
	public int saveAllNodesSetting(List<ActUserNodeSettingModel> nodesSetting);

	/**
	 * 修改节点配置
	 * 
	 * @param nodeSetting
	 * @return int
	 */
	public int updateNodesSetting(ActUserNodeSettingModel nodeSetting);

	/**
	 * 查询流程某个节点配置
	 * 
	 * @param processKey
	 * @param companyId
	 * @param nodeId
	 * @return ActUserNodeSettingModel
	 */
	public ActUserNodeSettingModel queryNodeSetting(@Param("processKey") String processKey,
			@Param("companyId") String companyId, @Param("nodeId") String nodeId);
	/**
	 * 查询流程所有节点配置
	 * 
	 * @param processKey
	 * @param companyId
	 * @return ActUserNodeSettingModel
	 */
	public List<ActUserNodeSettingModel> queryNodesSetting(@Param("processKey") String processKey,
			@Param("companyId") String companyId);
	
	/**
	 * 分页查询流程所有节点配置
	 * 
	 * @param processKey
	 * @param companyId
	 * @return ActUserNodeSettingModel
	 */
	public List<ActUserNodeSettingModel> queryNodesSettingByPage(ActUserProcessSettingModel setting);

	/**
	 * 删除节点配置
	 * 
	 * @param processKey
	 * @param companyId
	 * @return
	 */
	public int deleteUserNodesSetting(@Param("processKey") String processKey, @Param("companyId") String companyId);

	/**
	 * 删除所有配置
	 * 
	 * @param processKey
	 * @param companyId
	 * @return
	 */
	public int deleteAllUserSetting(@Param("processKey") String processKey, @Param("companyId") String companyId);
}
